//
//  Parser.m
//  MyFairLady
//
//  Created by dlios on 15-5-22.
//  Copyright (c) 2015年 蓝鸥. All rights reserved.
//

#import "Parser.h"

@implementation Parser

+(NSMutableArray *)getModel:(NSData *)data
{
    NSMutableArray *array = [NSMutableArray array];
    
    NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
    
    NSArray *array1 = [dic objectForKey:@"topics"];
    for (NSDictionary *dic1 in array1) {
        homePageModel *model = [homePageModel getHomPageModel];
        model.image_url = [dic1 objectForKey:@"image_url"];
        [array addObject:model];
        
    }
    return array;
}
@end
